home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ccdl150l.zip / IO / FREOPEN.C < prev    next >
C/C++ Source or Header  |  1996-08-08  |  374b  |  18 lines

  1. #include <stdio.h>
  2. #include <time.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <libp.h>
  6.  
  7. extern FILE *_pstreams[_NFILE_];
  8. extern char *_filenames[_NFILE_];
  9. extern int maxfiles ;
  10.  
  11. FILE *freopen(const char *name, const char *mode, FILE *stream)
  12. {
  13.     if (_basefclose(stream,0))
  14.         return 0;
  15.     if (!_basefopen(name,mode,stream))
  16.         return 0;
  17.     return stream;
  18. }